import * as echarts from "echarts";

export const barChartInit_two = (chartDom: HTMLElement) => {
  const myChart: echarts.ECharts = echarts.init(chartDom);
  const option = {
    // grid: {
    //   left: '3%',
    //   right: '4%',
    //   bottom: '3%',
    //   containLabel: true
    // },

    xAxis: {
      type: "category",
      boundaryGap: false,
    },
    yAxis: {
      type: "value",
    },

    series: [
      {
        name: "入院",
        type: "line",

        data: [0, 20, 40, 60, 80, 100],
      },
      {
        name: "出院",
        type: "line",

        data: [],
      },
      {
        name: "预定",
        type: "line",

        data: [],
      },
    ],
    legend: {
      data: ["入院", "出院", "预定"],
      top: "bottom",
    },
  };

  if (myChart) {
    myChart.setOption(option);
  }
};
